// 热门商品 接口
// 导入 我们封装好的 axios 的实例
import request from '@/utils/requiest'

interface MyHotListParams {
    count?: number,
    limitNum?: number
}
// 1. 秒杀商品接口
export const hotListApi = (info: MyHotListParams) => request.get('/pro/seckilllist', {
    params: info
})

// 2.热门搜索接口
 export  const hotSearchApi = () => request.get('/pro/hotword')
 
 // 3.模糊搜索列表接口
 export const searchListApi=(keyword:string,count?:number)=>request.get('/pro/search',{
    params:{keyword,count}
 })
// 4.商品列表接口
export const goodListApi = (info: { count: number, limitNum?: number }) => request.get('/pro/list', {
    params: info
})
//5.产品分类列表接口
export const categoryListApi=()=>request.get('/pro/categorylist')

// 6.产品分类下的品牌列表
export const cateBrandlistApi=(cate:string)=>request.get('/pro/categorybrandlist',{
    params:{category:cate}
})

// 7. 产品分类+品牌的接口
export const categortBrandGoodsListApi = (info: { category: string, brand: string }) => request.get('/pro/categorybrandprolist', {
    params: info
  })
//8.请求商品详细信息
export const getGoodsDetailApi=(id:string)=>request.get(`/pro/detail/${id}`)